#ifndef AWESOME_H__
#define AWESOME_H__

#include <util/twi.h>
#include <stdio.h>
#include <string.h>

#include <stdio.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <compat/ina90.h>


typedef long long time_type;
time_type get_current_time();


#define IS_SET(REG, BIT) ((REG & _BV(BIT)) != 0)
#define SET_BIT(REG, BIT) do {REG |= _BV(BIT);}while(0)
#define CLR_BIT(REG, BIT) do {REG &= ~_BV(BIT);}while(0)



/// MOTOARE
#define m0_In2			PA7	
#define m0_In1			PA6
#define mPORT0			PORTA
#define mPIN0			PINA

#define m1_In1			PA0				
#define m1_In2			PA1				
#define mPORT1			PORTA
#define mPIN1			PINA

#define m2_In2			PD2				
#define m2_In1			PD3				
#define mPORT2			PORTD
#define mPIN2			PIND


#define m3_In1          PC0
#define m3_In2          PC1
#define mPORT3			PORTC
#define mPIN3			PINC


/// SWITCHURI
#define Sw0		        PA2
#define sPIN0			PINA

#define Sw1			    PD5
#define sPIN1			PIND

#define Sw2			    PD6				
#define sPIN2			PIND

#define Sw3			    PA4
#define sPIN3			PINA

/// LEDURI
#define led1			PD4
#define lPORT1 			PORTD

#define led2			PD7
#define lPORT2 			PORTD

#define led3			PA5	
#define lPORT3 			PORTA

#define led0			PA3
#define lPORT0 			PORTA



#define ROT_CLOCKWISE     (-1)
#define ROT_STOPPED       ( 0)
#define ROT_TRIGONOMETRIC (+1)



#endif//AWESOME_H__

